FROM anapsix/alpine-java:8_server-jre_unlimited

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN mkdir -p /usr/local/app \
    /usr/local/skywalking/agent

WORKDIR /usr/local/app

EXPOSE 80

EXPOSE 8088

COPY ./*.jar ./application.jar

ENV SERVER_PORT=80

ENV JAVA_OPTS=""

ENTRYPOINT ["java", \
            "-Djava.security.egd=file:/dev/./urandom", \
            "-Dserver.port=${SERVER_PORT}", \
#           "-Dskywalking.agent.service_name=ruoyi-gateway", \
#           "-javaagent:/usr/local/skywalking/agent/skywalking-agent.jar", \
            "-jar", "application.jar"]

